home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 112 / EnigmaAmiga112CD.iso / dalla rivista / giochi in rete / sorgenti_amislate / amislate.h < prev    next >
C/C++ Source or Header  |  1995-08-05  |  4KB  |  131 lines

  1. /* AmiSlate.h -- function prototypes & etc. */
  2. #ifndef AMISLATE_H
  3. #define AMISLATE_H
  4.  
  5. #define USE_WORKBENCHSCREEN 0
  6. #define USE_CUSTOMSCREEN    1
  7. #define USE_PUBLICSCREEN    2
  8.  
  9. /* SlateRaster contains the current state of a given raster transmission
  10.    box. */
  11. struct SlateRaster {
  12.     int nRX;           /* left edge of raster box */
  13.     int nRY;           /* top edge of raster box */
  14.     int nRWidth;          /* width of raster box */
  15.     int nRHeight;         /* height of raster box */
  16.     int nRCurrentOffset;    /* number of pixels into the box */
  17. };
  18.  
  19.  
  20. /* PaintInfo contains all the state information needed to interpret sent
  21.    commands correctly.  */
  22. struct PaintInfo {
  23.     UBYTE  BPenDown;    /* TRUE = Pen Down, False = Pen Up */
  24.     UBYTE  ubDepth;            /* Depth of Window */
  25.     UWORD  uwWidth;            /* Width of Window */
  26.     UWORD  uwHeight;    /* Height of Window */
  27.     UWORD  uwMode;        /* Current Mode of Window (MODE_*) */
  28.     UWORD  uwFColor;    /* Current Foreground Color of Window */
  29.     UWORD  uwBColor;    /* Current Background Color of Window */
  30.     int    nToolBoxWidth;
  31.     int    nToolBoxHeight; 
  32.     int    nDefaultWidth;
  33.     int    nDefaultHeight;
  34.     BOOL   BDrawEnabled;
  35.     int    nSizeState;      /* normal, active, or passive */
  36.     
  37.     /* Info on Rexx port's state */
  38.     UWORD  uwRexxFColor;
  39.     UWORD  uwRexxBColor;
  40.     UWORD  uwRexxWaitMask;
  41.     
  42.     /* From here down contains info on the remote machine's state */
  43.     UWORD  uwRemoteScreenWidth;
  44.     UWORD  uwRemoteScreenHeight;
  45.     UBYTE  ubRemoteDepth;   /* # of bitplanes on remote machine's screen */
  46.     UWORD  uwRemoteMode;    /* Current mode of remote machine (MODE_*) */
  47.     UWORD  uwRemoteFColor;
  48.     UWORD  uwRemoteBColor;
  49.     
  50.     struct SlateRaster RemoteRaster;
  51.     struct SlateRaster LocalRaster;         
  52.     struct SlateRaster RexxRaster;        
  53. };
  54.  
  55.  
  56.  
  57. /* Here are the bit codes for different ARexx_return_ready values */
  58. #define REXX_REPLY_TIMEOUT     0x0001
  59. #define REXX_REPLY_MESSAGE     0x0002
  60. #define REXX_REPLY_MOUSEDOWN   0x0004
  61. #define REXX_REPLY_MOUSEUP     0x0008
  62. #define REXX_REPLY_RESIZE      0x0010
  63. #define REXX_REPLY_QUIT        0x0020
  64. #define REXX_REPLY_CONNECT     0x0040
  65. #define REXX_REPLY_DISCONNECT  0x0080
  66. #define REXX_REPLY_TOOLSELECT  0x0100
  67. #define REXX_REPLY_COLORSELECT 0x0200
  68. #define REXX_REPLY_KEYPRESS    0x0400
  69. #define REXX_REPLY_MOUSEMOVE   0x0800
  70.  
  71. #define REXX_REPLY_IMMEDIATE   0x4000    /* Internal use only--when timeout = 0 */
  72. #define REXX_REPLY_IFFLOAD     0x8000    /* Internal use only */
  73.  
  74. /* These help arbitrate window sizing to avoid race conditions */
  75. #define SIZEMODE_NORMAL     0x0000
  76. #define SIZEMODE_ACTIVE  0x0001
  77. #define SIZEMODE_PASSIVE 0x0002
  78.  
  79. VOID ResetState(struct PaintInfo *pi);
  80. VOID Swap(int *i1, int *i2);
  81. VOID SwapPointers(VOID *(*p1), VOID *(*p2));
  82. VOID ClearWindow(VOID);
  83. VOID SetGlobalDefaults(VOID);
  84. VOID ParseArgs(VOID);
  85. VOID UpperCase(char *sOldString);
  86. VOID LowerCase(char *sOldString);
  87. VOID SetWindowTitle(char *sString);
  88. VOID ToggleSafeFlood(VOID);
  89. VOID AdjustColor(char cKeyPressed, int nStep, int nPaletteEntry, UWORD *uwPresetColor, BOOL BTransmit);
  90. VOID SaveScreenPalette(BOOL BSaveIt, int nOptMaxPen);
  91. VOID ExecuteRexxScript(char *szPreparedFileName);
  92. VOID BreakRexxScripts(VOID);
  93. VOID SetMenuValues (VOID);
  94. VOID UserError(char *szErrorString);
  95. VOID ToggleLockPalettes(VOID);
  96. VOID SaveUserIFF(char *szPreparedFileName);
  97. VOID LoadUserIFF(char *szPreparedFileName);
  98.  
  99. int  ScreenTitleHeight(VOID);
  100. int  MatchPalette(UBYTE ubRed, UBYTE ubGreen, UBYTE ubBlue, BOOL BNotBackground, BOOL * BDeniedPenMap, BOOL * BJustAlloced);
  101. int  CleanExit(LONG lReturnResult);
  102. int  SaveScriptToDisk(VOID);
  103. int  PlayScriptFromDisk(VOID);
  104. int  ShowAbout(VOID);
  105. BOOL HandleIDCMP(struct IntuiMessage *defaultMessage);
  106. BOOL CreateDrawMenus(VOID);
  107. BOOL GetSlateArg(char *szArg, int *nParam, char **szParam);
  108. BOOL GetCLIArg(char *szArg, int *nParam, char **szParam);
  109. BOOL GetToolTypeArg(char *szArg, int *nParam, char **szParam);
  110. BOOL SetupToolTypeArg(void);
  111. BOOL LoadUserIFFNamed(int nFromCode, char * szFileName);
  112. BOOL SaveUserIFFNamed(char *szFileName);
  113.  
  114. LONG Max(LONG lA, LONG lB);
  115. LONG Min(LONG lA, LONG lB);
  116.  
  117. UWORD RGBComponents(UWORD uwPaletteEntry);
  118. UWORD ParseRexxMenu(UWORD uwMask);
  119.  
  120. int MakeReq(char *sText, char *sTitle, char *sGadgets);
  121.  
  122. char * UniqueName(char *szPath);
  123.  
  124. void debug(int nID);
  125. VOID wbmain(struct WBStartup *wbargv);
  126. int main(int local_argc, char *local_argv[]);
  127. BOOL CheckForUserAbort(void);
  128. void SetStandardRexxReturns(void);
  129.  
  130. #endif
  131.